﻿using HCQ2_Model;
using HCQ2_Model.APPModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HCQ2_IBLL
{
    public partial interface IT_RoleBLL
    {
        /// <summary>
        /// 获取所有的角色列表
        /// </summary>
        /// <returns></returns>
        List<T_Role> GetRoleData(string keyword,int page,int rows,string sm_code);
        /// <summary>
        ///  编辑角色
        /// </summary>
        /// <param name="role"></param>
        /// <returns></returns>
        bool EditRole(T_Role role,int id);
        /// <summary>
        ///  添加角色
        /// </summary>
        /// <param name="role"></param>
        /// <returns></returns>
        bool AddRole(T_Role role);
        /// <summary>
        ///  删除角色
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        bool DelRole(int id);
        /// <summary>
        ///  获取角色数量
        /// </summary>
        /// <param name="roleName"></param>
        /// <param name="smCode"></param>
        /// <returns></returns>
        int GetRoleCount(string roleName, string smCode);


        /// <summary>
        /// 获取待分配角色用户数据
        /// </summary>
        /// <param name="role_id"></param>
        /// <param name="unit_code"></param>
        /// <returns></returns>
        List<HCQ2_Model.SelectModel.ListBoxModel> GetWaitRoleDataByPerson(int role_id, string unit_code = null);
        /// <summary>
        ///  获取已分配角色用户数据
        /// </summary>
        /// <param name="role_id"></param>
        /// <returns></returns>
        List<HCQ2_Model.SelectModel.ListBoxModel> GetFineRoleDataByPerson(int role_id);
        /// <summary>
        ///  保存批量角色用户数据
        /// </summary>
        /// <param name="userid"></param>
        /// <param name="role_id"></param>
        /// <returns></returns>
        bool SaveRoleDataByPerson(string userid,int role_id);
        /// <summary>
        ///  获取用户拥有角色
        /// </summary>
        /// <param name="user_id"></param>
        /// <returns></returns>
        List<RoleLimitModel> getUserRole(int user_id);
    }
}